package pzl.com.androidloader;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        toolbar.setTitle("android loader 演示");
    }


    public void click(View view) {
        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.btn_1:
                intent.setClass(this, Demo1Activity.class);
                startActivity(intent);
                break;
            case R.id.btn_2:
                intent.setClass(this, Demo2Activity.class);
                startActivity(intent);
                break;
            case R.id.btn_3:
                intent.setClass(this, Demo3Activity.class);
                startActivity(intent);
                break;
        }
    }


}
